<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <title>实验管理系统
    </title>
    <link rel='stylesheet prefetch' href="stylesheets\style1.css">
    <link rel="stylesheet" href="stylesheets\style.css">
</head>

<body screen_capture_injected="true">
    <div>
        <h1 class="h1">实验管理系统</h1>
        <h2 class="h2">Copyright © 2017 版权归我们所有</h2>
        <div class="hr">
            <hr style=" background-color:black; height:1px" />
        </div>
        <div class="hr1">
            <hr style=" background-color:black; height:1px" />
        </div>
        <div class="td1">
            分班系统<br><br><br><br> 教师信息：
            <br><br><span>姓名：</span><span><%- user.name%></span><br><br>
            <span>工号：</span><span><%- user.no%></span><br><br>
            <span>系别：</span><span><%- user.department%></span><br><br><br><br><br><br><br><br><br>
            <button class="btn btn-lg btn-primary btn-block" type="submit" id="out1">登出</button>
            <button class="btn btn-lg btn-primary btn-block" type="submit" id="log2">excel</button>
        </div>
        <div style="width:30%;height:50%;position:absolute;top:110px;left:30%">
            <select class="form-control" id="sel1">
            <option value="mongodb">mongodb</option>
            <option value="java">java</option>
            <option value="html5">html5</option>
            <option value="nodejs">nodejs</option>
            </select>
        </div>
        <div style="width:30%;height:50%;position:absolute;top:150px;left:30%">
            <select class="form-control" id="sel2">
            <option value="1">一班</option>
            <option value="2">二班</option>
            <option value="3">三班</option>
            <option value="4">四班</option>
            </select>
        </div>
        <div style="width:50px;height:10px;left:60%;position:absolute;top:130px">
            <button class="btn btn-lg btn-primary btn-block" type="submit" id="getstu">确定</button>
        </div>
        <div>
            <div class="row-fluid-class">
                <h3>学生列表</h3>
                <table class="table table-hover span12" border=1>
                    <thead>
                        <tr>
                            <th>学号</th>
                            <th>用户名</th>
                            <th>密码</th>
                            <th>系别</th>
                        </tr>
                    </thead>
                    <tbody>
                        <% studentlist.forEach(function(data){ %>
                            <tr>
                                <td>
                                    <%= data.no %>
                                </td>
                                <td>
                                    <%= data.name %>
                                </td>
                                <td>
                                    <%= data.password %>
                                </td>
                                <td>
                                    <%= data.department %>
                                </td>
                            </tr>
                            <% }) %>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="javascripts/jquery.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#getstu").click(function () {
                var sel1 = $("#sel1").val();
                var sel2 = $("#sel2").val();
                $.ajax({
                    url: '/class1',
                    type: 'get',
                    data: {
                        sel1: sel1,
                        sel2: sel2
                    },
                })
                location.href = "studentlist";
            });
            $("#out1").click(function () {
                location.href = "logout";
            });
            $("#log2").click(function () {
                location.href = "excelup";
            });
        });
    </script>
</body>

</html>